#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int n,mpt[210][210];
int main()
{
	while (cin>>n)
	{
		memset(mpt, 0x3f3f3f3f, sizeof(mpt));
		for (int i = 1; i < n; i++)
			for (int j = i + 1; j <= n; j++)
				cin >> mpt[i][j];
		for (int k = 1; k < n; k++)
			for (int i = 1; i < n; i++)
				for (int j = i + 1; j <= n; j++)
					if (mpt[i][j] > mpt[i][k] + mpt[k][j])
						mpt[i][j] = mpt[i][k] + mpt[k][j];
		cout << mpt[1][n] << endl;
	}
	return 0;
}